OTRcvOrderlyDisconnect
Acknowledges a request for an orderly disconnect.C INTERFACE
OSStatus OTRcvOrderlyDisconnect(EndpointREf ref);C++ INTERFACE
OSStatus TEndpoint::RcvOrderlyDisconnect();PARAMETERS
ref
- The endpoint reference of the endpoint acknowledging receipt of the disconnect request.
DESCRIPTION
TheOTRcvOrderlyDisconnect
function is a service that is not supported by all protocols. If it is, theservtype
field of theTEndpointInfo
structure has the valueT_COTS_ORD
orT_TRANS_ORD
for the endpoint.After using the
OTRcvOrderlyDisconnect
function to acknowledge receipt of a disconnection request, there will not be any more data to receive. Calls to theOTRcv
function (for a transactionless connection) or to theOTRcvRequest
function (for a transaction-based connection) after acknowledging a disconnection request fail with thekOTOutStateErr
result. If the endpoint supports a remote orderly disconnect, you can still send data over the connection if you have not yet called theOTSndOrderlyDisconnect
function.The
OTRcvOrderlyDisconnect
function behaves in the same way in all modes of operation. If there is no disconnection request pending, the function returns with thekOTNoReleaseErr
result. It there is a disconnection request pending, the function returns either thekOTNoError
orkOTBufferOverflowErr
result. In the latter instance, you need to check thediscon
field of theTEndpointInfo
structure for your endpoint and make sure that the buffer referenced by theudata.buf
field is at least as big as the value specified for thediscon
field.VALID STATES
T_DATAXFER
,T_OUTREL
SEE ALSO
You use theOTSndOrderlyDisconnect
function (page 3-153) to send an orderly disconnect.For information on abortive and orderly disconnects see "Terminating a Connection," beginning on page 3-30.
You examine the
TEndpointInfo
structure (page 3-48) to determine whether the endpoint supports orderly release.